From 407b049aebf00b916e2b196c444a6a79ea064fd5 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 8 Feb 2010 10:18:14 +0000 Subject: [PATCH] Don't scrub broken pages Don't touch the poison pages when scrub the pages. Consuming poison page will contaminate the CPU context and may cause system crash. Signed-off-by: Jiang, Yunhong --- xen/common/page_alloc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 0e1925a3bb..735c207e80 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -1256,6 +1256,9 @@ void scrub_one_page(struct page_info *pg) { void *p = __map_domain_page(pg); + if ( unlikely(pg->count_info & PGC_broken) ) + return; + #ifndef NDEBUG /* Avoid callers relying on allocations returning zeroed pages. */ memset(p, 0xc2, PAGE_SIZE); -- 2.30.2